cmake_minimum_required (VERSION 2.6)
project ("Distribuidos")

set(SRC_DIR src/)
set(OUT_DIR out/)
set(CMAKE_BUILD_TYPE Debug)
include_directories("${SRC_DIR}IPC")
include_directories("${SRC_DIR}common")
AUX_SOURCE_DIRECTORY ("${SRC_DIR}common" COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR}IPC" COMMON_SRC)
file(MAKE_DIRECTORY ${OUT_DIR})
file(MAKE_DIRECTORY ${OUT_DIR}ej4)
file(MAKE_DIRECTORY ${OUT_DIR}ej5)
file(MAKE_DIRECTORY ${OUT_DIR}ej8)

add_executable(${OUT_DIR}ej4/launcher ${SRC_DIR}practicas/ej4/launcher.cpp ${COMMON_SRC})
add_executable(${OUT_DIR}ej4/producer ${SRC_DIR}practicas/ej4/producer.cpp ${COMMON_SRC})
add_executable(${OUT_DIR}ej4/consumer ${SRC_DIR}practicas/ej4/consumer.cpp ${COMMON_SRC})
add_executable(${OUT_DIR}ej4/terminator ${SRC_DIR}practicas/ej4/terminator.cpp ${COMMON_SRC})
add_executable(${OUT_DIR}ej5/launcher ${SRC_DIR}practicas/ej5/launcher.cpp ${COMMON_SRC})
add_executable(${OUT_DIR}ej8/launcher ${SRC_DIR}practicas/ej8/launcher.cpp ${COMMON_SRC} ${SRC_DIR}practicas/ej8/Sequencer.cpp)
add_executable(${OUT_DIR}ej8/terminator ${SRC_DIR}practicas/ej8/terminator.cpp ${COMMON_SRC} ${SRC_DIR}practicas/ej8/Sequencer.cpp)
add_executable(${OUT_DIR}ej8/processer ${SRC_DIR}practicas/ej8/processer.cpp ${COMMON_SRC} ${SRC_DIR}practicas/ej8/Sequencer.cpp)
